<template>
  <div class="list" @click="routerLink(`orderDetails`)">
    <div v-for="(temp,index) in 10" :key="index" class="list-item">
      <div class="pic">
        <img src="@/assets/pic.png" alt class>
      </div>
      <div class="item-name">庆阳红富士1.5kg(两箱起送)</div>
      <div class="stock">已售：3699</div>
      <div class="pirse">
        ￥<span>39.9</span>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  methods: {
    routerLink(href) {
      this.$router.push({
        name: href
      })
    }
  }
}
</script>

<style lang="less">
  .list {
    margin: 0 auto;
    width: 96%;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    margin-bottom: 60px;
    .list-item {
      width: 45%;
      margin: 5px 3px 8px;
      background: #fff;
      border-radius: 10px;
      img {
        width: 100%;
      }
      .pic {
        width: 160px;
        height: 120px;
        padding: 25px 0;
      }
      .item-name {
        font-size: 15px;
        color: #000;
        font-weight: bold;
        padding: 5px 10px;
      }
      .stock {
        font-size: 14px;
        color: #999999;
        padding: 5px 10px;
      }
      .pirse {
        color: #d63a54;
        font-size: 16px;
        padding: 5px 10px;
        text-align: right;
        span {
          font-size: 22px;
        }
      }
    }
  }
</style>
